/** 当路由表太长时，可以将其拆分为小模块 **/

import Layout from 'views/layout/layout'

const mallGoodsRouter = {
  path: '/mallGoods',
  component: Layout,
  redirect: 'noredirect',
  name: 'mallGoods',
  meta: {
    title: 'mallGoods',
    icon: 'mallGoods',
    roles: ['demo']
  },
  children: [
    {
      path: 'releaseNewGoods',
      component: () => import('pages/mallGoods/releaseNewGoods/index'),
      redirect: 'noredirect',
      name: 'releaseNewGoods',
      meta: {
        title: 'releaseNewGoods'
      },
      children: [
        {
          path: 'addGoods',
          component: () => import('pages/mallGoods/releaseNewGoods/addGoods'),
          name: 'addGoods',
          meta: {
            title: 'addGoods'
          }
        }
      ]
    },
    {
      path: 'inSaleCommodity',
      component: () => import('pages/mallGoods/inSaleCommodity/index'),
      redirect: 'noredirect',
      name: 'inSaleCommodity',
      meta: {
        title: 'inSaleCommodity'
      },
      children: [
        {
          path: 'inSaleGoods',
          component: () => import('pages/mallGoods/inSaleCommodity/inSaleGoods'),
          name: 'inSaleGoods',
          meta: {
            title: 'inSaleGoods'
          }
        }
      ]
    },
    {
      path: 'stockCommodity',
      component: () => import('pages/mallGoods/stockCommodity/index'),
      redirect: 'noredirect',
      name: 'stockCommodity',
      meta: {
        title: 'stockCommodity'
      },
      children: [{
        path: 'stockGoods',
        component: () => import('pages/mallGoods/stockCommodity/stockGoods'),
        name: 'stockGoods',
        meta: {
          title: 'stockGoods'
        }
      }]
    },
    {
      path: 'shelfManage',
      component: () => import('pages/mallGoods/shelfManage/index'),
      redirect: 'noredirect',
      name: 'shelfManage',
      meta: { title: 'shelfManage' },
      children: [
        {
          path: 'offShelf',
          component: () => import('pages/mallGoods/shelfManage/offShelf'),
          name: 'offShelf',
          meta: {
            title: 'offShelf'
          }
        },
        {
          path: 'onShelf',
          component: () => import('pages/mallGoods/shelfManage/onShelf'),
          name: 'onShelf',
          meta: {
            title: 'onShelf'
          }
        }, {
          path: 'batchOffShelf',
          component: () => import('pages/mallGoods/shelfManage/batchOffShelf'),
          name: 'batchOffShelf',
          meta: {
            title: 'batchOffShelf'
          }
        }, {
          path: 'batchOnShelf',
          component: () => import('pages/mallGoods/shelfManage/batchOnShelf'),
          name: 'batchOnShelf',
          meta: {
            title: 'batchOnShelf'
          }
        }
      ]
    }
  ]
}

export default mallGoodsRouter